/*
 * Common.h
 *
 *  Created on: 2014. 1. 14.
 *      Author: jjaehuny
 */

#ifndef PROJECTZ_NCOMMAND_NWORLDBOSS_COMMON_H_
#define PROJECTZ_NCOMMAND_NWORLDBOSS_COMMON_H_

#include "../../User.h"
#include "../../NLogic/Party.h"
#include "../../NResource/Static.h"

namespace ProjectZ { namespace NCommand {

inline void SendWorldBossDetailInfo(User * pUser)
{
	/*
	CS_REQ_WORLD_BOSS_DETAIL_INFO		 	0x4017
	{
		u16 u16dungeon_tid;
	}

	SN_REQ_WORLD_BOSS_DETAIL_INFO 			0x4018
	{
		s16 sAck;
		u16 u16boss_tid1;
		u16 u16boss_tid2;
		u16 u16boss_tid3;
		u16 u16map_id;
		u16 u16dungeon_tid;
	}
	*/

	NResource::WorldBoss * pWorldBoss = NResource::Static::Instance().GetWorldBossResource();
	if (NULL == pWorldBoss)
	{
		return;
	}

	::Network::Packet * pAck = ::Network::GETPACKETPOOL()->SEND_NEW();
	* pAck << static_cast<int16_t>(ACK_OK);
	* pAck << static_cast<uint16_t>(pWorldBoss->GetData().u16boss_tid1);
	* pAck << static_cast<uint16_t>(pWorldBoss->GetData().u16boss_tid2);
	* pAck << static_cast<uint16_t>(pWorldBoss->GetData().u16boss_tid3);
	* pAck << static_cast<uint16_t>(pWorldBoss->GetData().u16map_id);
	* pAck << static_cast<uint16_t>(pWorldBoss->GetData().u16dungeon_tid);

	pAck->MakePacket(CMD_SN_REQ_WORLD_BOSS_DETAIL_INFO);
	pUser->Send(pAck);
	return;
}

} /*NCommand*/ } /*ProjectZ*/

#endif /* PROJECTZ_NCOMMAND_NWORLDBOSS_COMMON_H_ */
